package de.koller.oceanFramework.glyph;

public class Glyph {

	private final int fontColor;
	private final int backColor;
	private int secondaryColor = 0xff808080;
	private final int glyphx;
	private final int glyphy;
	
	public Glyph( int fontColor, int backColor, int glyphx, int glyphy ) {
		this.fontColor = fontColor;
		this.backColor = backColor;
		this.glyphx = glyphx;
		this.glyphy = glyphy;
	}

	public int getBackColor() {
		return backColor;
	}

	public int getFontColor() {
		return fontColor;
	}

	public int getGlyphx() {
		return glyphx;
	}

	public int getGlyphy() {
		return glyphy;
	}

	public int getSecondaryColor() {
		return secondaryColor;
	}

	public void setSecondaryColor( int secondaryColor ) {
		this.secondaryColor = secondaryColor;
	}

	public boolean equals( Object obj ) {
		if( obj == null ) {
			return false;
		}
		if( getClass() != obj.getClass() ) {
			return false;
		}
		final Glyph other = ( Glyph ) obj;
		if( this.fontColor != other.fontColor ) {
			return false;
		}
		if( this.backColor != other.backColor ) {
			return false;
		}
		if( this.secondaryColor != other.secondaryColor ) {
			return false;
		}
		if( this.glyphx != other.glyphx ) {
			return false;
		}
		if( this.glyphy != other.glyphy ) {
			return false;
		}
		return true;
	}

	public int hashCode() {
		int hash = 3;
		hash = 61 * hash + this.fontColor;
		hash = 61 * hash + this.backColor;
		hash = 61 * hash + this.secondaryColor;
		hash = 61 * hash + this.glyphx;
		hash = 61 * hash + this.glyphy;
		return hash;
	}
	
}
